/*
 * $Id: Mutex.h,v 1.5 2005-12-15 07:13:30 bacon Exp $
 */

#ifndef _XPP_BAS_MUTEX_CLASS_
#define _XPP_BAS_MUTEX_CLASS_

#include <xpp/Uncopyable.h>
#include <xpp/Exception.h>
#include <xp/bas/mtx.h>

namespace xpp
{
	namespace bas
	{

		class Mutex: public xp_mtx_t, public Uncopyable
		{
		public:
			friend class Condition;

			Mutex ();
			~Mutex ();
		
			int lock    ();
			int unlock  ();
			int tryLock ();
		};
		
		XPP_EXCEPTION (MutexException);
		
	}
}
#endif
